@file:OptIn(ExperimentalJsCollectionsApi::class)

package io.github.xyzboom.cj.decl

import kotlin.js.collections.JsArray

/**
 * From Cangjie DAP server
 */
external interface CjEvalResultBody

inline val CjEvalResultBody.memoryAddress: String get() = this.asDynamic().memoryAddress
inline val CjEvalResultBody.namedVariables: Int get() = this.asDynamic().namedVariables
inline val CjEvalResultBody.result: String get() = this.asDynamic().result
inline val CjEvalResultBody.type: String? get() = this.asDynamic().type
inline val CjEvalResultBody.variablesReference: Int get() = this.asDynamic().variablesReference


external interface CjVarResultBody

inline val CjVarResultBody.variables: JsArray<CjVariable> get() = this.asDynamic().variables

external interface CjVariable

inline val CjVariable.variablesReference: Int get() = this.asDynamic().variablesReference
inline val CjVariable.qualifyName: String get() = this.asDynamic().evaluateName
inline val CjVariable.name: String get() = this.asDynamic().name
inline val CjVariable.type: String get() = this.asDynamic().type
inline val CjVariable.value: String get() = this.asDynamic().value
inline val CjVariable.memoryAddress: String get() = this.asDynamic().memoryAddress
inline val CjVariable.evaluateName: String get() = this.asDynamic().evaluateName